
PAPER TITLE: Bureaucratic Capacity and Political Favoritism in Public Procurement

AUTHOR: Diego Romero


DESCRIPTION: This directory contains all necessary code and data to replicate all tables and figures in the main text and online appendix of "Bureaucratic Capacity and Political Favoritism in Public Procurement." It contains one R file and 5 datasets in comma-separated values (csv) files. 


CONTENTS: 

BureaucraticCapacity_Replication.R - contains the necessary code to replicate all tables and figures in the main text and online appendix of "Bureaucratic Capacity and Political Favoritism in Public Procurement." All results were produced using R version 4.3.1 on a computer with a macOS Sonoma 14.3 operating system.                                      


gtm_bidleveldata_2013-2019.csv - contains the bid-level data for all purchases above GTMQ10,000 conducted by all Guatemalan municipalities in the period 2013-2019. The author scraped these from Guatecompras, Guatemala's online procurement system.

	Variables:
	1. award - (binary) whether the bidder obtained the contract.
	2. b_capacity - (continuous) bureaucratic capabilities index (BCI), constructed by averaging a municipality's scores on the IGA and IGE sub-indices.
        3. b_capacity_alt - (continuous) alternative bureaucratic capabilities index, constructed by averaging a municipality's scores on the IGA, IGE, and IGF sub-indices.
	4. connectedbin - (binary) main measure of firm-mayor connection based on whether the average contract size a firm obtained from municipalities governed by members of the mayor's clique is above the average contract size during the year before the current purchase.
	5. connectedbin_sharenumc - (binary) alternative measure of firm-mayor connection based on the share of contracts given in municipalities controlled by the mayor's clique which were given to the firm during the year before the current purchase.
	6. connectedbin_sharevalc - (binary) alternative measure of firm-mayor connection based on the share of value of contracts given in municipalities controlled by the mayor's clique which were given to the firm during the year before the current purchase.  	7. construction - (binary) indicator variable for whether the contract involves a construction project.             	8. contract_value - (continuous) value, in GTM Quetzales, of the contract. 
	9. cotizacion - (binary) indicator variable for whether the contract was allocated via a cotizacion procedure.      	10. crt_docume - (continuous) weight given to presenting paperwork when evaluating the bid.                
	11. crt_object - (continuous) weight given to the "objective" attributes of a bid, such as price and completion time, when evaluating the bid.            	12. crt_subfir_excp - (continuous) weight given to the "subjective" attributes of a bid, such as the quality of the bid and the bidder, when evaluating the bid. 
	13. dept_code - (factor) a unique code indicating each department of Guatemala.             	14. directpurchase - (binary) indicator variable for whether the contract was allocated via a direct purchase procedure.  
	15. electronic - (binary) indicator variable for whether the contract was allocated fully through the Guatemalan online procurement system, Guatecompras.              	16. entity_code - (factor) a unique code indicating each municipality of Guatemala.             
	17. firm_age - (continuous) the age of the firm, in years, since its foundation.            	18. firm_procage - (continuous) the number of years a firm has participated as a (national or local) government contractor.
	19. iga - (continuous) index of administrative management, developed by SEGEPLAN.                       	20. ige - (continuous) index of strategic management, developed by SEGEPLAN.                        
	21. igf - (continuous) index of financial management, developed by SEGEPLAN.                                 	22. igm - (continuous) index of municipal management, developed by SEGEPLAN.                                 
	23. iic - (continuous) index of information to citizenry (proxy for municipal government transparency), developed by SEGEPLAN.                            	24. inhab_anytime - (binary) whether the firm has a disqualification after the current contract.
	25. inhab_before - (binary) whether the firm has a disqualification before the current contract.	26. ipc - (continuous) index of index of citizen participation, developed by SEGEPLAN.                         
	27. isp - (continuous) index of index of public services, developed by SEGEPLAN.                      	28. licitacion - (binary) indicator variable for whether the contract was allocated via a licitacion procedure. 
	29. ln_firm_doc_ratio - (continuous) logarithm of the ratio of the weight given to the "subjective" attributes of a bid to the weight given to presenting paperwork when evaluating the bid.         	30. ln_objective_doc_ratio - (continuous) logarithm of the ratio of the weight given to the "objective" attributes of a bid to the weight given to presenting paperwork when evaluating the bid. 
	31. logpopulation - (continuous) logarithm of the estimated population of the municipality in the year the purchase event took place.        	32. logvalcontracts - (continuous) logarithm of the total value of all contracts awarded by the municipality during the previous year.   	33. modality_cat - (factor) a variable indicating the procedure used to allocate the contract.
	34. monto_ofertado - (continuous) bid amount (in GTM Quetzales)	35. n_winners - number of firms that won the contract.
	36. nit_bidder - (factor) a unique identifier for each firm.                   	37. num_bids - (continuous) number of competing bids.
	38. numcontracts - (continuous) number of contracts awarded by the municipal government in the past year.   	39. numcontracts_gov - (continuous) number of contracts awarded to the firm by the central government in the past year.  
	40. numcontracts_muninei - (continuous) number of contracts awarded to the firm by geographically neighboring municipalities.      	41. numcontracts_muninei_ct - (continuous) number of contracts awarded to the firm by geographically neighboring municipalities through cotizaciones.
	42. numcontracts_muninei_lt - (continuous) number of contracts awarded to the firm by geographically neighboring municipalities through licitaciones.	43. numcontracts_munisam - (continuous) number of contracts awarded to the firm by the municipality where the purchase is taking place.
	44. numcontracts_munisam_ct - (continuous) number of contracts awarded to the firm by the municipality where the purchase is taking place through cotizaciones.	45. numcontracts_munisam_lt - (continuous) number of contracts awarded to the firm by the municipality where the purchase is taking place through licitaciones.
	46. other - (binary) indicator variable for whether the contract was allocated via a different procedure from licitacion, cotizacion, or direct purchase.     	47. party_president - (binary) indicator variable for whether the mayor is in the same party as the current president of Guatemala in the year the purchase event took place.
	48. percontracts_muninei - (continuous) percentage of a firm's contracts during the past year which were awarded by geographically neighboring municipalities.	49. percontracts_munisam - (continuous) percentage of a firm's contracts during the past year which were awarded by the municipality in which the current purchase is taking place. 
	50. population - (continuous) estimated population of the municipality in the year the purchase event took place. 	51. rent_usdk - (continuous) average value of contracts (in USD) obtained by the firm during the previous year from municipalities government by members of the mayor's clique.
	52. risky_award - (binary) whether the bidder obtained the contract as the sole bidder.              	53. share_numcontracts_clique - (continuous) alternative measure of firm-mayor connection; the share of contracts given in municipalities controlled by the mayor's clique which were given to the firm during the year before the current purchase.
	54. share_valcontracts_clique - (continuous) alternative measure of firm-mayor connection; the share of value of contracts given in municipalities controlled by the mayor's clique which were given to the firm during the year before the current purchase.  	55. tiempo_cierre_adjudicacion - (continuous) number of days between the close of bid reception and the announcement of contract allocation.
	56. tiempo_publicacion_cierre - (continuous) number of days between the opening of the tender and the close of bid reception.	57. valcontracts_gov - (continuous) value of contracts obtained by the firm from the central government during the year before the current purchase. 
	58. valcontracts_muninei - (continuous) value of contracts obtained by the firm from geographically neighboring municipalities during the year before the current purchase.    	59. valcontracts_munisam - (continuous) value of contracts obtained by the firm from the municipality in which the current purchase is taking place. 
	60. win_last - (binary) indicator variable for whether the bid was the last submitted and it won the contract.                	61. year - the year when the purchase event took place.                      


IGM_ICL_2018.csv - contains municipal-level variables used to generate Table B4.

	Variables:
	1. cod_dep - (factor) a unique code indicating each department of Guatemala. 
	2. edu_publicexp_pc - (continuous) per capita expense in education, from the Ministry of Finance. 
	3. gdp_pc_2017 - (continuous) estimated per capita GDP, from FUNDESA.
	4. gm_index - (continuous) index of municipal management, developed by SEGEPLAN.    
	5. hel_publicexp_pc - (continuous) per capita expense in healthcare, from the Ministry of Finance. 	6. icl - local competitiveness index, developed by FUNDESA.               
	7. iga - (continuous) index of administrative management, developed by SEGEPLAN. 
	8. ige - (continuous) index of strategic management, developed by SEGEPLAN.
	9. igf - (continuous) index of financial management, developed by SEGEPLAN.                                  
	10. iic - (continuous) index of information to citizenry (proxy for municipal government transparency), developed by SEGEPLAN.              	11. ipc - (continuous) index of index of citizen participation, developed by SEGEPLAN.
	12. isp - (continuous) index of index of public services, developed by SEGEPLAN.       
	13. population - (continuous) estimated population of the municipality in 2018.
	14. urbanization_rate - (continuous) percentage of people living in an urban area, from the National Statistics Institute (INE).

 

PoliticalNetworksData_2011.csv - contains data on all pairs of candidates in the municipal elections of 2011.
	
	Variables:
	1. connected - (binary) whether the politician A and politician B are connected during the 2012-2015 period. 
	2. departamento_a - (character) name of the department of politician A. 
	3. dept_a - (factor) a unique code indicating the department of politician A. 
	4. elected_a - (binary) whether the politician A won the 2011 elections (to serve in office during the 2012-2015 period).
	5. elected_b - (binary) whether the politician B won the 2011 elections (to serve in office during the 2012-2015 period).     	6. entity_a - (factor) a unique code indicating the municipality of politician A. 
	7. entity_b - (factor) a unique code indicating the municipality of politician B. 
	8. id1 - (factor) a unique ID for politician A. 
	9. id2 - (factor) a unique ID for politician B.
	10. municipio - (character) name of the municipality of politician A.        	11. name_candidate_a - (character) name of politician A.
	12. name_candidate_b - (character) name of politician B.
	13. party_a_2009 - (character) name of the political party of politician A in the 2007 elections.
	14. party_a_2011 - (character) name of the political party of politician A in the 2011 elections.
	15. party_b_2009 - (character) name of the political party of politician B in the 2007 elections.    	16. party_b_2011 - (character) name of the political party of politician B in the 2011 elections. 
	17. year - year.   


PoliticalNetworksData_2015.csv - contains data on all pairs of candidates in the municipal elections of 2015.
	
	Variables:

	1. connected - (binary) whether the politician A and politician B are connected during the 2016-2019 period. 
	2. departamento_a - (character) name of the department of politician A. 
	3. dept_a - (factor) a unique code indicating the department of politician A.         	4. elected_a - (binary) whether the politician A won the 2011 elections (to serve in office during the 2012-2015 period).
	5. elected_b - (binary) whether the politician B won the 2011 elections (to serve in office during the 2012-2015 period).  
	6. entity_a - (factor) a unique code indicating the municipality of politician A.
	7. entity_b - (factor) a unique code indicating the municipality of politician B.
	8. id1 - (factor) a unique ID for politician A.             	9. id2 - (factor) a unique ID for politician B.              
	10. municipio - (character) name of the municipality of politician A.
	11. name_candidate_a - (character) name of politician A.
	12. name_candidate_b - (character) name of politician B.
	13. party_a_2009 - (character) name of the political party of politician A in the 2007 elections.    	14. party_a_2011 - (character) name of the political party of politician A in the 2011 elections.
	15. party_a_2015 - (character) name of the political party of politician A in the 2015 elections.
	16. party_b_2009 - (character) name of the political party of politician B in the 2007 elections.
	17. party_b_2011 - (character) name of the political party of politician B in the 2011 elections.
	18. party_b_2015 - (character) name of the political party of politician B in the 2015 elections.    	19. year - year.


gtm_RDD_connectedfirmsyears.csv - dataset of firm-municipality-years (for the 2016-2019 period), including only firms with connections during the 2012-2015 period. 

	Variables:
	1. b_capacity - (continuous) bureaucratic capabilities index (BCI), constructed by averaging a municipality's scores on the IGA and IGE sub-indices.
	2. cod_dept - (factor) a unique code indicating each department of Guatemala.             
	3. entity_code - (factor) a unique code indicating each municipality of Guatemala. 
	4. firm_age - (continuous) the age of the firm, in years, since its foundation.            	5. firm_procage - (continuous) the number of years a firm has participated as a (national or local) government contractor.     	6. iic - (continuous) index of information to citizenry (proxy for municipal government transparency), developed by SEGEPLAN.
	7. margin - (continuous) margin of victory of victory/defeat. 
	8. margin_victory_2015 - (continuous) margin of victory of the mayor in the 2015 elections. 
	9. nit_bidder - (factor) a unique identifier for each firm.   
	10. num_contracts - (continuous) yearly number of contracts obtained by the firm from the municipality.       	11. num_contracts_2015 - (continuous) number of contracts obtained by the firm from the municipality before 2016. 
	12. num_sb_contracts - (continuous) yearly number of contracts obtained by the firm as sole bidder from the municipality.   
	13. party_president - (binary) whether the mayor in power is in the party of the president. 
	14. population - (continuous) estimated population of the municipality.
	15. ran_for_reelection - (binary) whether the mayor in the 2012-2015 period ran for re-election in the 2015 elections. 	16. reelected - (binary) whether the mayor in the 2012-2015 period was re-elected in the 2015 elections. 
	18. val_contracts - (continuous) yearly value of contracts obtained by the firm from the municipality.    
	19. val_contracts_2015 - (continuous) value of contracts obtained by the firm from the municipality before 2016.
	20. val_sb_contracts - (continuous) yearly value of contracts obtained by the firm as sole bidder from the municipality.
	21. year - year. 




